<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>Hello React!</title>
    <script src="https://cdn.bootcss.com/react/15.4.2/react.min.js"></script>
    <script src="https://cdn.bootcss.com/react/15.4.2/react-dom.min.js"></script>
    <script src="https://cdn.bootcss.com/babel-standalone/6.22.1/babel.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
    //var title = "菜鸟教程";
    var title = true;
    var Mytitle = React.createClass({
        propTypes:{
            title: React.PropTypes.string.isRequired,
        },

        render: function(){
            return <h1>{this.props.title}</h1>;
        }
    });
    ReactDOM.render(
        <Mytitle title={title} />,
        document.getElementById('example')
    );
</script>
</body>
</html>